
; #CURRENT# ----------------------------------------------
; Func_Uninstall
;--------------------------------------------------------- 


; #Function# ---------------------------------------------
; Name...........: Func_Uninstall
; Description ...: Uninstall DiskSafe
; Parameters ....: 
; Return values .: NA
;---------------------------------------------------------

#cs
;[Test_S]

#include <Variable.au3>
#include <Func.au3>

Func_Uninstall()
;[Test_E]
#ce


Func Func_Uninstall()
	
	_log("Func_Uninstall() IN")
	
	RunWait(@ComSpec & " /c " & """DiskSafe Uninstall.lnk""", $G_UninstallPath, @SW_HIDE)
	
	WinWait($G_title_Uninstall, $G_text_Uninstall)	
	WinActivate($G_title_Uninstall, $G_text_Uninstall)
	WinWaitActive($G_title_Uninstall, $G_text_Uninstall)
	ControlClick ( $G_title_Uninstall, "&Yes", 6 )		;Click "Yes" to Uninstall
	
	WinWait($G_titleUninReboot, $G_textUninReboot)	
	WinActivate($G_titleUninReboot, $G_textUninReboot)
	WinWaitActive($G_titleUninReboot, $G_textUninReboot)
	ControlClick ( $G_titleUninReboot, "&Yes", 6 )		;Click "Yes" to Uninstall
	
	_log("Func_Uninstall() OUT")
	
	Shutdown(6)
	
EndFunc
